package com.second.app.thread.reentrant.interrupt;

/**
 * @author gyz
 * @date 2021/2/3 10:37
 */
public class Run {
    public static void main(String[] args) {
        final MyService myService = new MyService();

        try {
            Thread t0 = new Thread(() -> myService.waitMethod(), "线程A");
            t0.start();
            Thread.sleep(1000);
            t0.interrupt();

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
